package com.lee.service.impl;

import com.lee.bean.Class;
import com.lee.mapper.ClassMapper;
import com.lee.service.ClassService;
import com.lee.util.AjaxResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by dllo on 18/4/17.
 */
@Service
public class ClassServiceImpl implements ClassService {

    @Resource
    ClassMapper classMapper;

    @Override
    public AjaxResult selectAll() {
        AjaxResult result = new AjaxResult();
        Class clas = classMapper.selectAll();
        if (clas == null){
            result.setCode("0");
            result.setMessage("查询失败");
            return result;
        }
        result.setCode("1");
        result.setMessage("查询成功");
        result.setData(clas);
        return result;
    }
}
